/**
 * 
 */
package com.brother.goallife.utils;

import com.brother.goallife.dto.Account;
import com.brother.goallife.dto.AccountStatus;
import com.brother.goallife.type.AccountStatusType;

/**
 * @author anhtuan_truong
 * 
 */
public class GoallifeUtils {

	public static boolean isActive(Account account) {
		for (AccountStatus status : account.getStatuses()) {
			if (status.getValidTo() == null) {
				return status.getStatus() == AccountStatusType.ACTIVE;
			}
		}
		return false;
	}

}
